<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        .red {

            color: red;
        }

        .thin {
            font-weight: 200;
        }

        .italic {
            font-style: italic;
        }
    </style>
</head>
<body>

<div id="app">
    <h1 :class="['red','thin','italic']">{{msg}}</h1>

    <h1 :class="['red','thin', flag?'italic':'']">{{msg}}</h1>

    <h1 :class="['red','thin', {'italic':flag}]">{{msg}}</h1>
</div>
<script src="lib/vue.js"></script>
<script>
    var vm = new Vue({
        el: '#app',
        data: {
            msg: 'hello world 王五我问问无无无无',
            flag: false
        },
        methods: {}
    })
</script>
</body>
</html>